#include "configure_manager_widget.h"
#include "ui_configure_manager_widget.h"
#include <QApplication>

ConfigureManagerWidget::ConfigureManagerWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ConfigureManagerWidget)
{
    ui->setupUi(this);
    initEvents();
}

ConfigureManagerWidget::~ConfigureManagerWidget()
{
    delete ui;
}

void ConfigureManagerWidget::initEvents()
{
    connect(ui->previewBtn, &QPushButton::clicked, this, &ConfigureManagerWidget::onPreviewBtnClicked);
}

void ConfigureManagerWidget::onPreviewBtnClicked()
{
    QString styleSheet = ui->styleSheetTextEdit->toPlainText();

    qApp->setStyleSheet(styleSheet);
//    qApp->flush();
}
